Ext.define('App.view.cooperation.CooperationWindow', {
	extend : 'App.config.BaseWindow',
	requires : [ 'App.controller.cooperation.CooperationWindowController'],
	controller : 'cooperationWindowController',
	xtype : 'cooperationWindow',
	id : 'cooperationWindow',
	buttons : [ {
		text : '保存',
		action : 'save'
	}, {
		text : '关闭',
		handler : function() {
			this.up('window').close();
		}
	} ],
	items : [ {
		xtype : 'basewindowform',
		items : [{
			xtype:'hidden',
			name:'id'
		  },{
			   fieldLabel : '图片保存地址',
			   name : 'cooperationImgPath',
			   columnWidth: 0.70,
			   readOnly:true,
			   xtype:'textfield',
			   hidden:true,
			   labelWidth:160
	  	},{
	           columnWidth:0.1,
	           xtype:'button',
	           text:'换图',
	           name:'btn1',
	           hidden:true,
	           listeners:  {
	             click:function(me) {
		              var file=Ext.getCmp('cooperationWindow').down('form').down('[name=cooperationImgs]');
		              file.setVisible(true);
		              file.setDisabled(false);
		              me.setVisible(false);
	             }
	          }
	  	},{
		   fieldLabel : '图片',
		   xtype:'filefield',
		   name : 'cooperationImgs',
		   columnWidth: 0.80,
		   labelWidth:150,
		   disabled : false
        } ,{
            fieldLabel : "内容",
            beforeLabelTextTpl : [ '<font color=red data-qtip=必填选项>*</font>' ],
            name : 'content',
            allowBlank : false,
            xtype : 'htmleditor',
            columnWidth: 0.90,
            grow : true,
            plugins: [
                Ext.create('App.lib.HtmlEditorExtension')
            ]
        }]
	} ]
});